package com.mstore.service;

import com.mstore.dao.ConsumeDeleteLogDao;
import com.mstore.pojo.ConsumeDeleteLog;

public class ConsumeDeleteLogService {

	private ConsumeDeleteLogDao consumeDeleteLogDao;

	public void save(ConsumeDeleteLog consumeDeleteLog) {
		consumeDeleteLogDao.save(consumeDeleteLog);
	}

	public ConsumeDeleteLog findById(ConsumeDeleteLog consumeDeleteLog) {
		ConsumeDeleteLog b = (ConsumeDeleteLog) consumeDeleteLogDao
				.findById(consumeDeleteLog);
		if (b != null) {
			b.setLogConsumeTime(b.getLogConsumeTime().substring(0,
					b.getLogConsumeTime().indexOf(".")));
		}
		return b;
	}

	public ConsumeDeleteLogDao getConsumeDeleteLogDao() {
		return consumeDeleteLogDao;
	}

	public void setConsumeDeleteLogDao(ConsumeDeleteLogDao consumeDeleteLogDao) {
		this.consumeDeleteLogDao = consumeDeleteLogDao;
	}

	public void updateById(ConsumeDeleteLog consumeDeleteLog) {
		this.consumeDeleteLogDao.updateById(consumeDeleteLog);
	}

}
